function log (message)
{
	if (! _log_timeout)
		_log_timeout = window.setTimeout(dump_log, 1000);
	
	_log_messages.push(message);


	function dump_log()
	{
		var message = '';
		
		for (var i = 0; i < _log_messages.length; i++)
			message += _log_messages[i] + '\n';
				
		alert(message);
		
		_log_timeout = null;
		delete _log_messages;
		_log_messages = new Array();
	}
}


function inspect (obj)
{
	var message = 'Object possesses these properties:\n';
	
	if (obj)
	{
		for (var i in obj)
		{
			if ((obj[i] instanceof Function) || (obj[i] == null) ||
					(i.toUpperCase() == i))
				continue;
			
			message += i + ', ';
		}
		
		message = message.substr(0, message.length - 2);
	}
	else
		message = 'Object is null';
	
	log(message);
}

function inspectValues (obj)
{
	var message = '';
	
	if (obj)
		for (var i in obj)
		{
			if ((obj[i] instanceof Function) || (obj[i] == null) ||
					(i.toUpperCase() == i))
				continue;
			
			message += i + ': ' + obj[i] + '\n';
		}
	else
		message = 'Object is null';
	
	log(message);
}

var _log_timeout;
var _log_messages = new Array();
